import request from '@neu/biz-core/utils/request'
const baseUrl = 'dcam/api/w/files'

export const download = (fsId) => {
  return request({
    url: baseUrl + '/download/' + fsId,
    method: 'get',
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/octet-stream'
    }
  })
}

export const upload = baseUrl + '/upload'

export const deleteAnnex = (fsId) => {
  return request({
    url: baseUrl + '/' + fsId,
    method: 'delete'
  })
}
